<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="main" style="width: 800px; height: 600px;"></div>
  <div id="foo" style="width: 800px; height: 600px;"></div>
  <script src="./js/echarts.js"></script>
  <script>
    var myChart = echarts.init(document.getElementById('main'))
    var myChartFoo = echarts.init(document.getElementById('foo'))

    //表一
    myChart.setOption({
      title: {
        text: '我真想想笑，手动添加的Echarts参数'

      },
      xAxis: {
        data: ['貂蝉', '西施', '杨贵妃', '王昭君', '迪丽热巴', '古力娜扎', '刘亦菲']
      },
      yAxis: {},
      series: {
        type: 'bar',
        data: [19, 22, 28, 21, 28, 31, 33]
      }
    })

    //表二
    myChartFoo.setOption({
      xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
      },

      yAxis: {},
      series: [
        {
          data: [123, 111, 222, 165, 102, 99, 233],
          type: 'line'
        }
      ]

    })
  </script>
</body>

</html>